// 函数重载
interface A {
  x: number
  // y: string
  foo(bar: number): number  // 5
  foo(bar: 'a'): number  //2 
}
interface A {
  y: number
  foo(bar: string): string  // 3
  foo(bar: number[]): number[]  // 4
  foo(bar: 'a'): number // 1
}

let aMerge: A = {
  x: 1,
  y: 1,
  foo(bar: any) {
    return bar
  }
}

function lib() { }
namespace lib {
  export let version = '1.0'
}
console.log(lib.version)

class cmerge { }
namespace cmerge {
  export let state = 1
}
console.log(cmerge.state)

enum Color {
  red, yellow, bule
}
namespace Color {
  export function mix() { }
}
console.log(Color)

